home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2000 #5
/
Amiga Plus CD - 2000 - No. 5.iso
/
Tools
/
Misc
/
InstallerNG
/
developer
/
gui
/
example
/
igui_SWING_Mode.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-10-31
|
2KB
|
82 lines
#include "includes.h"
#include "installergui_data.h"
/********************************************************************
*
* DESCRIPTION
*
* when the InstallerNG evaluates a SWINF function, then it calls
* igui_SWING_Mode(app, TRUE) if it starts to interpret the arguments
* and calls igui_SWING_Mode(app, FALSE) when it leaves the SWING
* function. you should note in your private application structure,
* that you execute inside of a SWING environment, because you must
* distinguish the execution modes, when you wait (see the igui_WaitApp
* function.
*
* IN: application - pointer to the private application structure
* mode - TRUE or FALSE, depends on whether the InstallerNG
* enters (TRUE) or exits (FALSE) the SWING mode
*
* OUT: the mode argument itself
*
*/
/********************************************************************
*
* STATIC
*
*/
/********************************************************************
*
* EXTERN
*
*/
/********************************************************************
*
* PUBLIC
*
*/
/********************************************************************
*
* CODE
*
*/
BOOL __asm igui_SWING_Mode(register __a0 APTR application,
register __d0 BOOL mode)
{
#ifdef DEBUG
DEBUG_MAKRO
#endif
{
struct Application *app = (struct Application *) application;
// keep the mode
app->app_SWING_Mode = mode;
// switch to SWING mode
if (mode)
{
igui_NameProceed(app, app->app_Texts[BUTTON_NEXTPAGE]);
igui_NameCancel(app, app->app_Texts[BUTTON_PREVPAGE]);
}
// reset from the SWING mode
else
{
igui_NameProceed(app, (char *) app->app_GlobalEnv[GENV_PROCEED_BUTTON]);
igui_NameCancel(app, (char *) app->app_GlobalEnv[GENV_ABORT_BUTTON]);
igui_DisableCancel(app, FALSE);
}
return (mode);
}
}